<template>
  <div>
    <h4 class="boardName"></h4>
    <div class=" lightBox equipmentnumbox">
        <ul>
          <li>
            <div class="equipmentnumicon"><img src="@images/num1.png" alt=""> </div>
            <div class="equipmentnumnum"><h6 >{{msgFormSon[6]}}</h6> <p >已接入设备数</p> </div>
          </li>
          <li>
            <div class="equipmentnumicon"><img src="@images/num2.png" alt=""></div>
            <div class="equipmentnumnum"><h6 style="color: #289DF5">{{Onlineequ[Onlineequ.length-1].bnum||0}}</h6> <p>上线设备</p> </div>
          </li>
          <li>
            <div class="equipmentnumicon"> <img src="@images/num3.png" alt=""></div>
            <div class="equipmentnumnum"><h6 style="color: #FBC225">{{ (OnlineRateAndNetRate.netRate*100).toFixed(2) ||0}}%</h6> <p>上网率</p> </div>
          </li>
          <li>
            <div class="equipmentnumicon"> <img src="@images/num4.png" alt=""></div>
            <div class="equipmentnumnum"><h6 style="color: #66B92E">{{ getOnlineRate || 0}}%</h6> <p>在线率</p> </div>
          </li>
        </ul>
    </div>
  </div>
</template>

<script>
export default {
  name: "index",
  props:{
    OnlineRateAndNetRate:{
      type:Object,
      default:()=>{}
    },
    Onlineequ:{
      type:Array,
      default:()=>[]
    },
    haveEQUcount:{
      type:[Number,String],
      default:0
    },
    msgFormSon:{
      type:Array,
      default:()=>[]
    }
  },
  watch:{
    ArchiveOnline(val){
      console.log(val);
    }
  },
  computed: {
    getOnlineRate: function() {
      let sum = this.msgFormSon[6];
      let onLineSum = this.Onlineequ[this.Onlineequ.length - 1].bnum;
      return ((onLineSum / sum) * 100).toFixed(2);
    },
  }
};
</script>

<style scoped lang="less">
@import "../../light.less";
</style>
